<?php

if (isset($_SESSION['login'])) {
    if ($_POST['selection'] == "Delete") {
        foreach ($_POST['selected'] as $value) {

            $oEnsemble->ChargerLeClientById($sql, $value);
            $oEnsemble->getLeClient()->suprimerClient($sql);

            header('Location: index.php?mod=client&page=modification_client');
        }
    }elseif(isset($_GET['id'])){
            $oEnsemble->ChargerLeClientById($sql, $_GET['id']);
            $oEnsemble->getLeClient()->suprimerClient($sql);

            header('Location: index.php?mod=client&page=modification_client');
    }
} else {
    header('Location: index.php?mod=connexion&page=connexion');
}
?>
